<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<%
	request.setAttribute("title", "我的保单");
%>
<%@ include file="/WEB-INF/views/shared/master/weContentHeader.jsp"%>
<style>
	.tab-container{
		background-color: #fff;
		border-bottom: 1px solid #f5f5f5 !important;
	}
	.tab li{
		min-width:120px;
		width:49%;
	}
	a{
		color:#000;
	}
	.weui-grid:before{
		border: 0px;
	}
	.weui-grid:after{
		border: 0px;
	}
	
	.grid-button {
		width: 20%;
	}
	.active {
		color: #2196F3;
	}

	.weui-btn {
		font-size: 0.7rem;
		padding: 0;
		overflow: visible;
	}
	.weui-btn:after {
		border: 0;
	}
	.weui-btn_default {
		background-color: #fff;
	}
	.weui-btn_primary {
		background-color: #017cde;
	}
	.weui-btn_primary:not(.weui-btn_disabled):active {
	  	color: rgba(255, 255, 255, 0.6);
	  	background-color: #017cde;
	}
	.weui-grid {
		background-color: #fff;
		padding: 5px;
	}
	.weui-grid:before {
		border: 0;
	}
	.weui-grid:after {
		border: 0;
	}
	.weui-grids {
		background-color: #fbfbfb;
	}
	.weui-grids:before {
		border: 0;
	}
	
</style>

<%@ include file="/WEB-INF/views/shared/master/weTitle.jsp"%>
<div class="goback" data-back-point="personCenter"></div>
<form class="findInsu" method="post" action="<c:url value='/wechat/policy/listPolicy/policyList'/>">		
	<input type="hidden" class="isCar" name="isCar" value="notCarInsu"/>
	<input type="hidden" class="insuState" name="insuState" value="all"/>	
</form>
<div>
	<div class="tab-container" data-id="claim-container" id="claim-tab">
		<ul class="tab tab-horizontal" >
			<li data-id="tab1" class="active tab1" style="border-right: 1px solid #f5f5f5;">
				<span>非车险</span>
			</li>
			<li data-id="tab2" class="tab2">
				<span>车险</span>
			</li>
		</ul>
	</div>
</div>
<div>
	<div class="weui-grid js_grid grid-button">
		<a href="javascript:;" class="weui-btn weui-btn_default active" data-value="all">全部</a>
	</div>
	<div class="weui-grid js_grid grid-button">
		<a href="javascript:;" class="weui-btn weui-btn_default " data-value="ready">待承保</a>
	</div>
	<div class="weui-grid js_grid grid-button">
		<a href="javascript:;" class="weui-btn weui-btn_default " data-value="yes">承保中</a>
	</div>
	<div class="weui-grid js_grid grid-button">
		<a href="javascript:;" class="weui-btn weui-btn_default " data-value="no">已完成</a>
	</div>
	<div class="weui-grid js_grid grid-button forAcc">
		<a href="javascript:;" class="weui-btn weui-btn_default " data-value="fail">承保失败</a>
	</div>
</div>
<div style="clear: both;"></div>
<div id="claim-container">


</div>


<%@ include file="/WEB-INF/views/shared/scripts/jquery.jsp"%>
<%@ include file="/WEB-INF/views/shared/scripts/jqweui.jsp"%>
<%@ include file="/WEB-INF/views/shared/scripts/tabmob.jsp"%>
<script type="text/javascript">
$(function(){
	
	toselect();
	
	//一级菜单
	$("ul").click(function () {
		
		if($(".tab1").hasClass("active")){
			$(".isCar").val("notCarInsu");
			$(".forAcc").show();
			$(".grid-button").css("width","19.9%");
		}else{
			$(".isCar").val("carInsu");
			$(".forAcc").hide();
			$(".grid-button").css("width","24.9%");
			$(".insuState").val("all");
		}
		
		toselect();
	})
	
	//二级菜单
	$(".grid-button").click(function(){
		$(this).children().addClass("active");
		$(this).siblings().children().removeClass("active");
		$(".insuState").val($(this).children().data("value"));		
		
		toselect();
	});
	
});

//传输数据
function toselect() {
	var formData=$(".findInsu").serialize();
	var action=$(".findInsu").attr("action");
	var html=$.getText(action,formData);
	$("#claim-container").html(html);
}	
</script>

<%@ include file="/WEB-INF/views/shared/master/weContentFooter.jsp"%>